package top.lingkang.finalgateway.admin.mapper;

import top.lingkang.finalgateway.admin.entity.IpListLogEntity;
import top.lingkang.finalgateway.admin.param.IpListLogParam;
import top.lingkang.mm.annotation.MagicMapper;
import top.lingkang.mm.orm.BaseMapper;

import java.util.List;

/**
 * @author lingkang
 * @create by 2024/5/28 10:20
 */
@MagicMapper
public interface IpListLogMapper extends BaseMapper<IpListLogEntity> {

    List<IpListLogEntity> list(IpListLogParam param);

    default void add(Integer port, String type, String content) {
        IpListLogEntity entity = new IpListLogEntity();
        entity.setPort(port);
        entity.setType(type);
        entity.setContent(content);
        insert(entity);
    }
}
